package cn.cupk;
import cn.cupk.entities.*;

public class Main {
    public static void main(String[] args) {
        CreatureCollections zoo = new CreatureCollections();

        // 添加动物
        Animal lion = new Animal();
        lion.setName("狮子");
        lion.setAge(5);
        lion.setHealthStatus("健康");
        lion.setSpecies("猫科");
        lion.setHabitat("非洲");
        zoo.addCreature(lion);
        System.out.println(lion);

        // 添加管理员
        Admin admin = new Admin();
        admin.setName("张三");
        admin.setAge(30);
        admin.setHealthStatus("健康");
        admin.setGender("男");
        admin.setTelephoneNumber("1234567890");
        zoo.addCreature(admin);

        // 删除动物
        zoo.removeCreature(lion);

        // 修改管理员健康状态
        zoo.updateCreatureHealthStatus(admin, "有伤病");

        // 查找动物员成员
        Creature foundCreature = zoo.findCreatureByName("张三");
        if (foundCreature != null) {
            System.out.println(foundCreature);
        }else {
            System.out.println("没有该成员");
        }
    }
}
